package com.biz.primus.ms.order.dao.po;

import com.biz.primus.ms.base.jpa.converter.ListStringConverter;
import com.biz.primus.ms.base.jpa.po.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.io.Serializable;
import java.util.List;

/**
 * 订单评价PO
 *
 * @author Tiger Feng
 * @date 2017年11月04日
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "ord_order_evaluation")
public class OrderEvaluation extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1341455805820563678L;

    @OneToOne
    private Order order;

    //描述相符评分
    @Column(nullable = false)
    private Integer descriptionScore;

    //物流速度评分，用于统计店铺的总得分
    @Column(nullable = false)
    private Integer logisticsScore;

    //服务态度评分，用于统计店铺的总得分
    @Column(nullable = false)
    private Integer attitudeScore;

    //评价内容
    @Column(columnDefinition = "TEXT")
    private String content;

    //评价图片
    @Column(columnDefinition = "TEXT")
    @Convert(converter = ListStringConverter.class)
    private List<String> images;
}
